//对象属性的描述对象  

let obj = {name:'lili'};

console.log(obj);

//一个参数：对象   第二个参数：属性
let desc = Object.getOwnPropertyDescriptor(obj,'name');

console.log(desc);

/**
 *  configurable: true   //是否可配置
    enumerable: true     //是否可枚举  for in循环
    value: "lili"        //值
    writable: true       //是否可以修改
 * 
*/

Object.defineProperty(obj,'name',{
    configurable:false,
    enumerable:false,
    writable:false,
    value:'ppp'
})
// delete obj.name

// for(let key in obj){
//     console.log(key)
// }

obj.name = 'zs'

console.log(obj)




